package com.study.thread.createThread;

public class ThreadDemo2 {
    public static void main(String[] args) {
        Thread t1 = new Thread(new ThreadDemoTest1());
        t1.start();
        ThreadDemoTest1 t2 = new ThreadDemoTest1();
        t2.start();
    }
}

class ThreadDemoTest1 extends Thread {
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName() + "：使用继承Thread创建线程，启动");
    }
}